package com.simpleplayer.engine;

import android.content.Context;

public class PlayerEngineFactory {
    public static PlayerEngine CreateEngine(@PlayerEngine.ENGINETYPE int type, Context context) {
        switch (type) {
            case PlayerEngine.AndroidMediaPlayer:
                return new MediaPlayerEngine();
            case PlayerEngine.ExoPlayer:
                return new ExoPlayerEngine(context);
            case PlayerEngine.IjkPlayer:
                return new IjkPlayerEngine(context);
            default:
                return null;
        }
    }
}
